﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using TCEasyPrintRev.Controllers;
using TCEasyPrintRev.Models;

namespace TCEasyPrintRev.WCF_pemesanan
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Pemesanan" in code, svc and config file together.
    public class Pemesanan : IPemesanan
    {
       


        //Pemesanan
        public List<string> getProduk()
        {
            return ProdukController.getList();

        }

        public List<string> getPaketbyProduk(string id)
        {

            return PaketController.getList(id);

        }

        public string getPaketbyID(string id)
        {
            Paket paket = PaketController.getPaketByID(id);

            return paket.warna.ID + "|" + paket.bahan.ID + "|" + paket.panjang.ToString() + "|" + paket.lebar.ToString();
        }

        public void tambahPesanan()
        {

        }


      

        public double getHargaWarna(string id)
        {
            return WarnaController.getHarga(id);
        }

        public double getHargaBahan(string id)
        {
            return BahanController.getHarga(id);
        }

        public string getNamaWarna(string id)
        {
            return WarnaController.getNama(id);
        }

        public string getNamaBahan(string id)
        {
            return BahanController.getNama(id);
        }
    }
}
